<%@ page language="java" contentType="text/html; charset=UTF-8"
	isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap">
	<div class="nav">
		<ul class="cc">
			<li class="current"><a href='<yjd:url url="/admin/list"/>'>管理员列表</a></li>
			<li><a href='<yjd:url url="/adminrole/list"/>'>角色组权限</a></li>
		</ul>
	</div>
	<div class="mb10">
		<a href='<yjd:url url="/admin/toadd"/>' class="btn"><span class="add"></span>添加管理员</a>
	</div>
	<div class="table_list">
		<table width="100%">
			<thead>
				<tr>
					<td width="50">id</td>
					<td>登录名</td>
					<td>角色组</td>
					<td>登录时间</td>
					<td>登录ip</td>
					<td>登录地址</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody id="J_word_list">
			<c:forEach items="${list }" var="item">
				<tr>
					<td>${item.adminModel.admin_id }</td>
					<td>${item.adminModel.username }</td>
					<td>
					<c:if test="${ empty item.roleList }">
					  --
					</c:if>
					<c:if test="${ not empty item.roleList }">
						<ul class="single_list cc">
						    <c:forEach items="${item.roleList }" var="it">
						    <li>${it.role_name }</li>
						    </c:forEach>
						  </ul>
					</c:if>
					
					</td>
					<td>${item.adminModel.strMap.lastlogin }</td>
					<td>${item.adminModel.ip }</td>
					<td>${item.ipdata }</td>
					<td>
						<a href='<yjd:url url="/admin/toedit/${item.adminModel.admin_id }"/>' class="btn mr10">设置</a>
						<a href='<yjd:url url="/admin/del/${item.adminModel.admin_id }"/>'
						class="btn btn_orange J_ajax_del" data-msg="确定删除该管理员？"
						id="J_ajax_del_${item.adminModel.admin_id }">删除</a>
					</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
	</div>
</div>